package com.community.common.pojo.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 公众号用户表
 * </p>
 *
 * @author superman
 * @since 2020-08-02
 */
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("t_public_user")
public class PublicUser implements Serializable {


    private static final long serialVersionUID = -6431646709320773717L;
    /**
     * 主键
     */
    private String id;

    /**
     * 关联照片ID
     */
    private String pictureId;

    /**
     * 用户名
     */
    @NotBlank(message = "name不能为空")
    private String name;
    /**
     * 微信openId
     */
    @NotBlank(message = "openId不能为空")
    private String openId;
    /**
     * 身份证号
     */
    private String idCard;
    /**
     * 政治面貌 13-群众 01-党员 03-团员
     */
    private String zzmm;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 性别 1-男; 2-女;
     */
    private String sex;
    /**
     * 年龄
     */
    private Integer age;

    private Integer friendNumber;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


}
